package com.project.system.Controller;

import com.project.common.commenReturn.Result;
import com.project.common.commenReturn.Utils;
import com.project.common.exception.BizException;
import com.project.system.Service.JobsService;
import com.project.system.beans.Jobs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/data")
public class JobsController {
    @Autowired
    JobsService jobsService;
    @RequestMapping("/getall")
    public Result getAll(){
        List<Jobs> data  = jobsService.getAll();
        Map<String,Object> map =new HashMap<>();


        if(data!=null&&data.size()>0){
            String str="this is another test";
            return Utils.success(data);
        }else{
            String str="this is another bad test";
            return Utils.success(str);
        }


    }

}
